<?php require_once($_SERVER['DOCUMENT_ROOT']."/defaultconf.mex");
require_once($GLOBALS['PAD']."Modules/FJK46JDE/modconf.php");
MYTCONN();
	$qrOffice = "SELECT OriNumero AS ID, OriNombre AS NAME FROM officeschema.origenes WHERE OriTipo IN (1,2) AND OriNumero >= 800";
	echo '<div class="title">Seleccionar  funcionario</div>';

	echo '<div style="margin:5px">Loja: '; mn_field('select','ED','tsv_Domain','',$qrOffice,'','','" onchange="
		replaceUrl(\'SelectionMemberList\',\''.$MODURL.'Lib/selmemberlist.php?SMDM=\'+tsv_Domain.options[tsv_Domain.selectedIndex].value+\'&SMFG=\'+tsv_Flag.options[tsv_Flag.selectedIndex].value);');
	echo ' Situacao '; mn_field('hselect','ED','tsv_Flag',2,'Em Aprovacao;Activo;Suspenso;Dispensado#1;2;3;4','','','" onchange="
		replaceUrl(\'SelectionMemberList\',\''.$MODURL.'Lib/selmemberlist.php?SMDM=\'+tsv_Domain.options[tsv_Domain.selectedIndex].value+\'&SMFG=\'+tsv_Flag.options[tsv_Flag.selectedIndex].value);');
	echo '</div>
	<div id="SelectionMemberList" style="margin:5px">Funcionarios: ';
	$qrStaffMembers = "SELECT smb_ID AS ID, smb_Name AS NAME FROM systemoffice.staff_members WHERE smb_Flag = 2 ORDER BY smb_Name";
	mn_field('select','ED','tsv_Member','',$qrStaffMembers,' ','','" onchange="
		replaceUrl(\'SelcMember\',\''.$MODURL.'Lib/get_memberrsm.php?SMID=\'+this.options[this.selectedIndex].value);');
	echo '</div>';